// pages/my/my.js
import cache from "../../enum/cache"
Page({

    /**
     * 页面的初始数据
     */
    data: { 
        appointmentMy: [
            {
                id: 1,
                iconName: 'dianji',
                name: '待处理'
            },
            {
                id: 2,
                iconName: 'wenjianjia_o',
                name: '待支付'
            },
            {
                id: 3,
                iconName: 'queding',
                name: '待确认'
            },
            {
                id: 4,
                iconName: 'xiaoxi',
                name: '待评价'
            },
            {
                id: 5,
                iconName: 'tuikuan',
                name: '售后/退款'
            },
        ],
        myAppointment: [
            {
                id: 1,
                iconName: 'dianji',
                name: '待同意'
            },
            {
                id: 2,
                iconName: 'wenjianjia_o',
                name: '待支付'
            },
            {
                id: 3,
                iconName: 'queding',
                name: '待确认'
            },
            {
                id: 4,
                iconName: 'xiaoxi',
                name: '待评价'
            },
            {
                id: 5,
                iconName: 'tuikuan',
                name: '售后/退款'
            },
        ],
        offering: [
            {
                id: 1,
                iconName: 'shijian_o',
                name: '待审核'
            },
            {
                id: 2,
                iconName: 'fabu',
                name: '待发布'
            },
            {
                id: 3,
                iconName: 'biaoqian',
                name: '已发布'
            },
            {
                id: 4,
                iconName: 'xiaoxi',
                name: '查看全部'
            },
        ],
        userInfo: {},
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function (options) {
        
    },


    handleLogin(){
        wx.navigateTo({
            url: '/pages/login/login',
        });
    },

    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function () {

    },

    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function () {
        let userInfo = wx.getStorageSync(cache.USERINFO);
        this.setData({
            userInfo: userInfo
        })
    },

    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide: function () {

    },

    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload: function () {

    },

    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh: function () {

    },

    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom: function () {

    },

    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {

    }
})